Commit e77d1763 by 张新旗

代码提交

parent 0c232214
...@@ -88,7 +88,7 @@ public class OrderController extends BaseController ...@@ -88,7 +88,7 @@ public class OrderController extends BaseController
return ajaxResult; return ajaxResult;
} }
int amount = order.getAmount().movePointRight(2).intValue(); int amount = order.getAmount().movePointRight(2).intValue();
Map payInfo = weixinService.pay(request, "hooloo", order.getOrderNo(), order.getUserId(), amount); Map payInfo = weixinService.pay(request, "hooloo", order.getOrderNo(), order.getUserId(), 1);
if(payInfo !=null){ if(payInfo !=null){
return AjaxResult.success(payInfo); return AjaxResult.success(payInfo);
}else{ }else{
......
...@@ -73,7 +73,7 @@ public class OrderRefundController extends BaseController ...@@ -73,7 +73,7 @@ public class OrderRefundController extends BaseController
OrderRefund orderRefund1 = (OrderRefund) obejct; OrderRefund orderRefund1 = (OrderRefund) obejct;
int totalFee = orderRefund1.getTotalFee().movePointRight(2).intValue(); int totalFee = orderRefund1.getTotalFee().movePointRight(2).intValue();
int refundAmount = orderRefund1.getRefundAmount().movePointRight(2).intValue(); int refundAmount = orderRefund1.getRefundAmount().movePointRight(2).intValue();
weixinService.refund(orderRefund1.getRefundNo(),orderRefund1.getOrderNo(),totalFee,refundAmount); weixinService.refund(orderRefund1.getRefundNo(),orderRefund1.getOrderNo(),1,1);
orderRefund1.setState("1"); orderRefund1.setState("1");
orderRefundService.updateOrderRefund(orderRefund1); orderRefundService.updateOrderRefund(orderRefund1);
} }
...@@ -86,7 +86,7 @@ public class OrderRefundController extends BaseController ...@@ -86,7 +86,7 @@ public class OrderRefundController extends BaseController
int totalFee = orderRefund.getTotalFee().movePointRight(2).intValue(); int totalFee = orderRefund.getTotalFee().movePointRight(2).intValue();
int refundAmount = orderRefund.getRefundAmount().movePointRight(2).intValue(); int refundAmount = orderRefund.getRefundAmount().movePointRight(2).intValue();
orderRefund.setState("1"); orderRefund.setState("1");
weixinService.refund(orderRefund.getRefundNo(),orderRefund.getOrderNo(),totalFee,refundAmount); weixinService.refund(orderRefund.getRefundNo(),orderRefund.getOrderNo(),1,1);
return AjaxResult.success( orderRefundService.updateOrderRefund(orderRefund)); return AjaxResult.success( orderRefundService.updateOrderRefund(orderRefund));
} }
......
...@@ -101,7 +101,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter ...@@ -101,7 +101,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
// 过滤请求 // 过滤请求
.authorizeRequests() .authorizeRequests()
// 对于登录login 注册register 验证码captchaImage 允许匿名访问 // 对于登录login 注册register 验证码captchaImage 允许匿名访问
.antMatchers("/login", "/register", "/captchaImage","/weixin/**","/application/**","/v1/**","/tool/**","/system/**").anonymous() .antMatchers("/login", "/register", "/captchaImage","/weixin/**","/application/**","/v1/**","/tool/**").anonymous()
.antMatchers( .antMatchers(
HttpMethod.GET, HttpMethod.GET,
"/", "/",
......
...@@ -5,6 +5,7 @@ import java.util.List; ...@@ -5,6 +5,7 @@ import java.util.List;
import com.ruoyi.system.domain.Goods; import com.ruoyi.system.domain.Goods;
import com.ruoyi.system.domain.ShopGoods; import com.ruoyi.system.domain.ShopGoods;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;
/** /**
* 店铺和商品关联Mapper接口 * 店铺和商品关联Mapper接口
...@@ -70,4 +71,6 @@ public interface ShopGoodsMapper ...@@ -70,4 +71,6 @@ public interface ShopGoodsMapper
List<Goods> selectShopNoAddGoods(@Param("goodsName") String goodsName, @Param("category") String category, @Param("shopId") Long shopId); List<Goods> selectShopNoAddGoods(@Param("goodsName") String goodsName, @Param("category") String category, @Param("shopId") Long shopId);
void deleteByShopIdGoods(@Param("shopId") Long shopId, @Param("goodsIds") List<String> goodsIds);
} }
...@@ -252,7 +252,7 @@ public class ShopServiceImpl implements IShopService ...@@ -252,7 +252,7 @@ public class ShopServiceImpl implements IShopService
String string = body.getString("goodsIds"); String string = body.getString("goodsIds");
List<String> goodsIds = JSONObject.parseArray(string, String.class); List<String> goodsIds = JSONObject.parseArray(string, String.class);
shopGoodsSkuMapper.deleteByGoodsIds(shopId,goodsIds); shopGoodsSkuMapper.deleteByGoodsIds(shopId,goodsIds);
shopGoodsMapper.deleteByShopIdGoods(shopId,goodsIds);
return null; return null;
} }
......
...@@ -44,7 +44,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -44,7 +44,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createdAt != null "> and created_at = #{createdAt}</if> <if test="createdAt != null "> and created_at = #{createdAt}</if>
<if test="updatedAt != null "> and updated_at = #{updatedAt}</if> <if test="updatedAt != null "> and updated_at = #{updatedAt}</if>
<if test="code != null and code != ''"> and code = #{code}</if> <if test="code != null and code != ''"> and code = #{code}</if>
<if test="shelfAt != null shelfAt code != ''"> and shelf_at = #{shelfAt}</if>
</where> </where>
</select> </select>
......
...@@ -114,6 +114,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -114,6 +114,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and category like concat('%', #{category}, '%') and category like concat('%', #{category}, '%')
</if> </if>
</select> </select>
<delete id="deleteByShopIdGoods">
delete from shop_goods where shop_id =#{shopId}
and goods_id in
<foreach collection="goodsIds" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment