Browse Source

[A端][更改]:场景发券配置接口更改

release_toaliyun_real
hupeng 7 years ago
parent
commit
847c999af6
5 changed files with 14 additions and 16 deletions
  1. +6
    -4
      mallinkAdmin/src/main/java/com/iformall/controller/WxCouponSendConfigController.java
  2. +1
    -1
      mallinkService/src/main/java/com/iformall/domain/po/WxCouponSendConfig.java
  3. +1
    -1
      mallinkService/src/main/java/com/iformall/mapper/WxCouponSendConfigMapper.java
  4. +4
    -4
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendConfigServiceImpl.java
  5. +2
    -6
      mallinkService/src/main/resources/mapper/WxCouponSendConfigMapper.xml

+ 6
- 4
mallinkAdmin/src/main/java/com/iformall/controller/WxCouponSendConfigController.java View File

@@ -24,10 +24,10 @@ public class WxCouponSendConfigController extends BaseController {
private WxCouponSendConfigService wxCouponSendConfigService;

@ApiOperation("获取开关")
@GetMapping("getCouponSendConfig")
public ResultData getCouponSendConfig(@RequestAttribute WxCouponSendConfig wxCouponSendConfig) {
@GetMapping("get")
public ResultData getCouponSendConfig(@ModelAttribute WxCouponSendConfig wxCouponSendConfig) {
logger.debug("[" + getIpAddr() + "] WxMallConfigController::getCouponSendConfig");
if (wxCouponSendConfig == null || wxCouponSendConfig.getSendType() != null)
if (wxCouponSendConfig == null || wxCouponSendConfig.getSendType() == null)
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR);

wxCouponSendConfig.setTenantId(getTenantId());
@@ -39,12 +39,14 @@ public class WxCouponSendConfigController extends BaseController {
}


@PostMapping("updateCouponSendConfig")
@PostMapping("update")
@ApiOperation("修改开关")
public ResultData updateCouponSendConfig(@RequestBody WxCouponSendConfig wxCouponSendConfig) {
logger.debug("[" + getIpAddr() + "] WxMallConfigController::updateStopCarConpon");
if (wxCouponSendConfig == null)
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR);
if (wxCouponSendConfig.getId() == null)
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR);
if (wxCouponSendConfig.getSendType() == null)
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR);
if (wxCouponSendConfig.getValue() == null)


+ 1
- 1
mallinkService/src/main/java/com/iformall/domain/po/WxCouponSendConfig.java View File

@@ -7,7 +7,7 @@ import java.util.List;
import javax.persistence.Id;
import java.io.Serializable;

@Table(name = "wx_mall_config")
@Table(name = "wx_coupon_send_config")
public class WxCouponSendConfig implements Serializable {
private static final long serialVersionUID = 1L;


+ 1
- 1
mallinkService/src/main/java/com/iformall/mapper/WxCouponSendConfigMapper.java View File

@@ -6,7 +6,7 @@ import com.iformall.domain.po.WxCouponSendConfig;

public interface WxCouponSendConfigMapper extends CommonMapper<WxCouponSendConfig, Long> {

List<WxCouponSendConfig> findList(WxCouponSendConfig wxMallConfig);
List<WxCouponSendConfig> findList(WxCouponSendConfig wxCouponSendConfig);



+ 4
- 4
mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendConfigServiceImpl.java View File

@@ -9,25 +9,25 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.iformall.common.IdWorker;

@Service
public class WxCouponSendConfigServiceImpl implements WxCouponSendConfigService {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
@Autowired
WxCouponSendConfigMapper wxMallConfigMapper;
WxCouponSendConfigMapper wxCouponSendConfigMapper;


@Override
public PageInfo<WxCouponSendConfig> listAsPage(WxCouponSendConfig record, Integer pageIndex, Integer pageSize) {
return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxMallConfigMapper.findList(record));
return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCouponSendConfigMapper.findList(record));
}


@Override
public void update(WxCouponSendConfig record) {
wxMallConfigMapper.updateByPrimaryKeySelective(record);
wxCouponSendConfigMapper.updateByPrimaryKeySelective(record);
}




+ 2
- 6
mallinkService/src/main/resources/mapper/WxCouponSendConfigMapper.xml View File

@@ -28,7 +28,7 @@
</if>
<if test=" null != key ">
<if test=" null != sendType ">
and `send_type` = #{sendType}
</if>
@@ -65,10 +65,6 @@
select <include refid="allColumns" /> from wx_coupon_send_config
<include refid="dynamicWhereConditions" />
</select>

</mapper>

Loading…
Cancel
Save