Browse Source

维沙商品默认值

Aslee 4 years ago
parent
commit
88ff54da6d

+ 2 - 2
src/main/resources/mappings/modules/weisha/CmOrganizeProductMapper.xml

@@ -113,8 +113,8 @@
 		</where>
 	</select>
 	<select id="findProductByProductId" resultType="com.caimei.modules.weisha.entity.CmOrganizeProduct">
-		select productID as productId, ladderPriceFlag,price1 as price,includedTax,invoiceType,taxPoint as clubTaxPoing,supplierTaxPoint as shopTaxPoint,minBuyNumber,costCheckFlag as costType,
-		       costPrice,costProportional,freePostFlag as postageType
+		select productID as productId, ladderPriceFlag,price1 as price,ifnull(includedTax,2) as includedTax,invoiceType,taxPoint as clubTaxPoint,supplierTaxPoint as shopTaxPoint,minBuyNumber,costCheckFlag as costType,
+		       costPrice,costProportional,ifnull(freePostFlag,2) as postageType
 		from product
 		where productID = #{productId}
 	</select>

+ 3 - 3
src/main/webapp/WEB-INF/views/modules/weisha/cmOrganizeProductForm.jsp

@@ -219,9 +219,9 @@
 		<div class="control-group">
 			<label class="control-label">运费:</label>
 			<div class="controls">
-				<form:radiobutton path="postageType" value="1" label="默认(遵循运费规则)" class="required" /><b class="line">|</b>
-				<form:radiobutton path="postageType" value="2" label="包邮" class="required" /><b class="line">|</b>
-				<form:radiobutton path="postageType" value="3" label="到付" class="required" />
+				<input type="radio" name="postageType" value="2" ${(empty cmOrganizeProduct.postageType || cmOrganizeProduct.postageType eq "2") ? "checked" : ""}>默认(遵循运费规则)<b class="line">|</b>
+				<input type="radio" name="postageType" value="0" ${product.postageType == "0" ? "checked" : ""}>包邮<b class="line">|</b>
+				<input type="radio" name="postageType" value="1" ${product.postageType == "1" ? "checked" : ""}>到付
 			</div>
 		</div>
 		<div class="form-actions">