Authored by mali

Merge branch 'master' into hotfix_areacode

... ... @@ -14,4 +14,6 @@ public interface AreaMapper {
List<Area> selectByCodeList(@Param("codeList") List<Integer> orderList);
List<Area> selectByParentCode(@Param("parentCode") String parentCode);
int insertArea(Area area);
}
... ...
... ... @@ -42,5 +42,9 @@
and left(id, 6)=#{parentCode} and length(id) &gt;6
</if>
</select>
<insert id="insertArea" parameterType="com.yoho.order.model.Area">
insert into area(id, code, caption)
values (#{id}, #{code}, #{caption})
</insert>
</mapper>
\ No newline at end of file
... ...
package com.yoho.ufo.order.controller;
import com.yoho.order.model.Area;
import com.yoho.order.model.BuyerOrderReq;
import com.yoho.order.model.QiniuLiveRecord;
import com.yoho.ufo.exception.PlatformException;
... ... @@ -192,4 +193,10 @@ public class UfoLiveController {
int reslut = phoneUidCameraService.updateByphoneUid(phoneUidCameraBo);
return new ApiResponse.ApiResponseBuilder().code(200).data(reslut).message("更新成功").build();
}
@RequestMapping(value = "/insertArea")
public ApiResponse insertArea(Area area) {
int reslut = phoneUidCameraService.insertArea(area);
return new ApiResponse.ApiResponseBuilder().code(200).data(reslut).message("更新成功").build();
}
}
... ...
package com.yoho.ufo.order.service.impl;
import com.yoho.error.exception.ServiceException;
import com.yoho.order.dal.AreaMapper;
import com.yoho.order.dal.PhoneUidCameraMapper;
import com.yoho.order.model.Area;
import com.yoho.order.model.PhoneUidCamera;
import com.yoho.ufo.exception.PlatformException;
import com.yohobuy.ufo.model.order.bo.PhoneUidCameraBo;
... ... @@ -23,6 +25,9 @@ public class PhoneUidCameraService {
@Autowired
private PhoneUidCameraMapper phoneUidCameraMapper;
@Autowired
private AreaMapper areaMapper;
public boolean insert(PhoneUidCameraBo record) {
if (StringUtils.isEmpty(record.getPhoneUid()) || null == record.getCameraCode()) {
return false;
... ... @@ -70,4 +75,9 @@ public class PhoneUidCameraService {
return phoneUidCameraMapper.updateByphoneUid(phoneUidCamera);
}
public int insertArea(Area area) {
return areaMapper.insertArea(area);
}
}
... ...